package com.company.dcm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.company.dcm.entity.Permission;
import com.company.dcm.entity.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface PermissionService extends IService<Permission> {
    List<Long> getWorkShopIdsByUserId(Long userId);

    List<Long> getFactoryIdsByUserId(Long userId);

    @Transactional
    boolean deleteWorkShop(Permission permission, User user);

    @Transactional
    boolean deleteFactory(Permission permission, User user);
}
